package com.htl.泛型;

public class Time__test {
    public static void main(String[] args) {
        Time<Integer> time = new Time<>();
        time.setValue(10);
        System.out.println("现在的时间是：" + time.getValue());

        Time<String> time2 = new Time<>();
        time2.setValue("十点");
        System.out.println("现在的时间是：" + time2.getValue());

    }
}

class Time<T>{
    private T value;

    public T getValue() {
        return value;
    }

    public void setValue(T value) {
        this.value = value;
    }
}